<?php if (Yii::app()->user->isGuest) :?>
<div class="userLogon">
	<?php $form=$this->beginWidget('CActiveForm', array(
		'id'=>'frLogin',
		'action' => Yii::app()->createUrl('/user/login'),
		'enableAjaxValidation'=>false,
	)); ?>
		<div class="inputLogon">
			<div class="row-1">
				<div class="textbox">
					<div class="inputEmail">
						<?php echo $form->textField($model,'username',array('onfocus'=> "javascript:if(this.value == '--Tài khoản--') this.value='';", 'onblur' => "javascript:if(this.value == '')this.value='--Tài khoản--';")); ?>
					</div>
					<div class="inputPassword">
						<?php echo $form->passwordField($model,'password',array('onfocus'=> "javascript:if(this.value == '--Mật khẩu--') this.value='';", 'onblur' => "javascript:if(this.value == '')this.value='--Mật khẩu--';")); ?>
					</div>
				</div>
				<div class="clear"></div>
			</div>
			<div class="row-2">
<!--				<span> <input type="checkbox" id="chkSavePasswordR" name="chkSavePasswordR">&nbsp;<label for="chkSavePasswordR">Ghi nhớ</label></span><span>&nbsp;|&nbsp;</span><span>-->
				<span><?php echo CHtml::link(UserModule::t("Lost Password?"),Yii::app()->getModule('user')->recoveryUrl, array('class' => 'forgotpass')); ?></span>
			</div>
		</div>
		<div class="enterLogon">
			<?php echo CHtml::submitButton('Đăng nhập', array('class' => 'btnLogon', 'style' => 'border-color: #FFF;')); ?>
		</div>
	<?php $this->endWidget(); ?>
</div>
<?php else :?>
<div class="userWelcome">
	<div class="contentWelcome">
		<div class = "center" >
			<span class="username" onclick="document.location.href='<?php echo Yii::app()->createUrl('account')?>';"><?php echo CHtml::encode($info['name']);?></span>
			<p class="user_course">
				<span>
					<?php //echo CHtml::imageButton(Util::themeUrl() . '/images/setting-icon.png', array('onclick' => 'window.location.href = "'. Yii::app()->createUrl('account') .'"', 'class' => 'link-logout', 'title' => 'Thông tin cá nhân')); ?>
				</span>
				<?php echo $info['descript'];?>
			</p>
		</div>
		<div class="clear"></div>
		<div class="logout">
			<span><?php echo CHtml::imageButton(Util::themeUrl() . '/images/turn_off.png', array('onclick' => 'window.location.href = "'. Yii::app()->createUrl('user/logout') .'"', 'class' => 'link-logout', 'title' => 'Thoát')); ?></span>
		</div>
	</div>
</div>
<?php endif;?>